import org.asdtiang.exceldemo.domain.ArmyJob
import org.apache.poi.ss.usermodel.Sheet
import org.apache.poi.ss.usermodel.Workbook
import org.apache.poi.ss.usermodel.WorkbookFactory

import java.lang.reflect.Field

try{
	//InputStream inp = new FileInputStream("workbook.xlsx");
	InputStream inp = new FileInputStream("/Users/lidongliang/openSource/exceldemo/src/main/resources/16972086ec894481190432.xlsx")

	Workbook wb = WorkbookFactory.create(inp);
	Sheet sheet = wb.getSheetAt(0);
	int rowNum = sheet.getLastRowNum();
	println "excel------->rowNum"+rowNum
	int i = 6;
	
	Field[] fields = ArmyJob.class.getDeclaredFields();
	fields.each { it->
		print('"'+it.name+'",');
	}
}catch( Exception e) {
	e.printStackTrace()
}
